package org.xzx.shop_api.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.xzx.shop_api.entity.Members;

@Mapper
public interface MemberMapper {
    public int insertMembers(Members members) ;
    //根据用户名查询账号信息
    public Members getMembersByUsername(String username);
    //修改密码
    public int updatePassword(String username, String password);
    //修改支付密码
    public int updatePayPassword(int id, @Param("payPassword") String payPassword);

    //更新手机号码
    public int updateMobile(int id, @Param("mobile") String mobile);
    //根据用户名查询账号信息
    public Members getMembersByMobile(String mobile);

    //根据用户id查找
    public Members getMembersById(int id);

    //修改个人信息
    public int updateMyInfo(int id,
                            @Param("username") String username,
                            @Param("nickname")String nickname,
                            @Param("gender") int gender,
                            @Param("birthday")String birthday);

    //上传头像
    public int updateLogo(int id, @Param("logo") String logo);

    //修改认证状态
    public int updateIsAuth(int id, @Param("isAuth") int isAuth);
}
